<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="UTF-8"/>
</head>
<body>

<form th:action="@{/{url}(url=${submitUrl})}" method="POST">
    <div>编号 : <input type="text" name="id" th:readonly="${ user?.id} != null" th:value="${ user?.id}"/></div>
    <div>姓名 : <input type="text" name="name" th:value="${user?.name}"/></div>
    <div>年龄 : <input type="text" name="age" th:value="${user?.age}"/></div>
    <div>性别 :
        <select name="sex">
            <option value=""></option>
            <option th:selected="${user?.sex}=='男'" value="男">男</option>
            <option th:selected="${user?.sex}=='女'" value="女">女</option>
        </select>
    </div>
    <div><input type="submit" value="提交"/></div>
</form>

</body>
</html>